﻿<%@ Page Title="Thông tin nhân sự | VNT Việt Nam" Language="C#" MasterPageFile="~/Admin.master"
    AutoEventWireup="true" CodeFile="NhanSu.aspx.cs" Inherits="NhanSu" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        option
        {
            line-height: 30px;
        }
    </style>
    
    <script type="text/javascript">
        $(document).ready(function () {
            
            $("#btnmr").click(function () {
                $("#mr").slideToggle();
            });
        });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<asp:UpdatePanel ID="up1" runat="server">
        <ContentTemplate>--%>
    <div class="panel panel-success margin">
        <div class="panel-heading">
            <h3 class="panel-title">
                Thông tin nhân sự</h3>
        </div>
        <div class="panel-body">
            <table width="100%">
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Mã nhân viên</span><br />
                        <asp:TextBox ID="txtMaNV" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Hình ảnh</span> &nbsp;&nbsp;
                        <asp:FileUpload ID="fu" runat="server" Width="100%" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Họ và tên</span><br />
                        <asp:TextBox ID="txtHoTen" runat="server" CssClass="form-control withall"></asp:TextBox>
                        <asp:RequiredFieldValidator ValidationGroup="Them" ID="RequiredFieldValidator111"
                            runat="server" ControlToValidate="txtHoTen" ErrorMessage="Nhập họ tên" Display="None"
                            Text="*"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Mã HS</span><br />
                        <asp:TextBox ID="txtMaHS" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Chức vụ</span><br />
                        <asp:DropDownList CssClass="form-control" Style="line-height: 30px;" DataTextField="TenCV"
                            DataValueField="IDs" ID="dlChucVu" Width="100%" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Phòng ban</span><br />
                        <asp:DropDownList CssClass="form-control" DataTextField="TenPB" DataValueField="IDs"
                            ID="dlPhongBan" Width="100%" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Ngày sinh</span><br />
                        <asp:TextBox ID="txtNgaySinh" runat="server" CssClass="form-control withall"></asp:TextBox>
                        <cc1:CalendarExtender ID="CalendarExtender1" PopupPosition="TopLeft" runat="server"
                            TargetControlID="txtNgaySinh" Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Điện thoại</span><br />
                        <asp:TextBox ID="txtDienThoai" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Giới tính</span><br />
                        <asp:RadioButton ID="ck_Nam" runat="server" GroupName="s" Checked="true" Text="Nam" />&nbsp;&nbsp;
                        <asp:RadioButton ID="ck_Nu" runat="server" GroupName="s" Text="Nữ" />
                    </td>
                </tr>
               </table>
                <input type="button" id="btnmr" value="Thông tin mở rộng" class="btn btn-primary" style="margin-left:5px;" />
               <div id="mr" style="display:none; margin-top:5px;">
               <table width="100%">
                 <tr>
                    <td>
                        <span style="margin-left: 5px;">Dân tộc</span><br />
                        <asp:TextBox ID="txtDanToc" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Chiều cao</span><br />
                        <asp:TextBox ID="txtChieuCao" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">CMTND</span><br />
                        <asp:TextBox ID="txtcmtnd" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Ngày cấp</span><br />
                        <asp:TextBox ID="txtNgayCap" runat="server" CssClass="form-control withall"></asp:TextBox>
                        <cc1:CalendarExtender ID="CalendarExtender2" PopupPosition="TopLeft" runat="server"
                            TargetControlID="txtNgayCap" Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Nơi cấp</span><br />
                        <asp:TextBox ID="txtNoiCap" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Mã số thuế cá nhân</span><br />
                        <asp:TextBox ID="txtMSTCaNhan" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Tình trạng hôn nhân</span><br />
                        <asp:RadioButton ID="ck_KetHon" runat="server" GroupName="kh" Checked="true" Text="Kết hôn" />&nbsp;&nbsp;
                        <asp:RadioButton ID="ck_ChuaKetHon" runat="server" GroupName="kh" Text="Chưa kết hôn" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Quê quán</span><br />
                        <asp:TextBox ID="txtQueQuan" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Nơi ở hiện tại</span><br />
                        <asp:TextBox ID="txtNoiohientai" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Trình độ</span><br />
                        <asp:TextBox ID="txtTrinhDo" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Chuyên môn</span><br />
                        <asp:TextBox ID="txtChuyenMon" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Bằng cấp</span><br />
                        <asp:TextBox ID="txtBangCap" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Ngày thử việc</span><br />
                        <asp:TextBox ID="txtNgaythuviec" runat="server" CssClass="form-control withall"></asp:TextBox>
                        <cc1:CalendarExtender ID="CalendarExtender3" PopupPosition="TopLeft" runat="server"
                            TargetControlID="txtNgaythuviec" Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Thời gian thử viêc</span><br />
                        <asp:TextBox ID="txtThoigianthuviec" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Ngày chính thức</span><br />
                        <asp:TextBox ID="txtNgaychinhthuc" runat="server" CssClass="form-control withall"></asp:TextBox>
                        <cc1:CalendarExtender ID="CalendarExtender4" PopupPosition="TopLeft" runat="server"
                            TargetControlID="txtNgaychinhthuc" Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Thời gian hợp đồng</span><br />
                        <asp:TextBox ID="txtThoigianhopdong" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Ngày hết hạn hợp đồng</span><br />
                        <asp:TextBox ID="txtNgayhethanhopdong" runat="server" CssClass="form-control withall"></asp:TextBox>
                        <cc1:CalendarExtender ID="CalendarExtender5" PopupPosition="TopLeft" runat="server"
                            TargetControlID="txtNgayhethanhopdong" Format="dd/MM/yyyy">
                        </cc1:CalendarExtender>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Email</span><br />
                        <asp:TextBox ID="txtEmail" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="margin-left: 5px;">Email công ty</span><br />
                        <asp:TextBox ID="txtEmailcongty" runat="server" CssClass="form-control withall"></asp:TextBox>
                    </td>
                </tr>
               </table>
               </div>
               <table width="100%" style="margin-top:5px;">
                <tr>
                    <td>
                        <asp:Button ID="btnSave" ValidationGroup="Them" runat="server" Style="margin-left: 5px;"
                            Text="Lưu lại" CssClass="btn btn-primary" OnClick="btnSave_Click" />
                        <asp:Button ID="btncapnhat" runat="server" Text="Cập nhật" CssClass="btn btn-info"
                            OnClick="btncapnhat_Click" Visible="false" />
                        <asp:Button ID="btnCancel" runat="server" Text="Nhập mới" CssClass="btn btn-warning"
                            OnClick="btnCancel_Click" />
                        <asp:Button ID="btnPDF" Visible="false" runat="server" Text="Xuất PDF" CssClass="btn btn-info"
                            OnClick="btnPDF_Click" />
                    </td>
                </tr>
            </table>
            <asp:ValidationSummary ID="ValidationSummary1" HeaderText="Bạn phải nhập các trường sau:"
                ShowMessageBox="true" ValidationGroup="Them" ShowSummary="false" EnableClientScript="true"
                runat="server" />
            <div style="margin: 5px;">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <b>Danh sách nhân viên</b>
                    </div>
                    <div style="width: 100%; margin-top: 0px;" class="wrapper">
                        <asp:GridView ID="GV" runat="server" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
                            BorderWidth="1px" CellPadding="1" EmptyDataText="Không có dữ liệu nào" EnableModelValidation="True"
                            CssClass="form-control withall" Width="99%" AutoGenerateColumns="False" OnRowCommand="GV_RowCommand">
                            <Columns>
                                <asp:TemplateField HeaderText="Xóa" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                    ItemStyle-Width="50px">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="lbXoa" runat="server" Width="20px" Height="20px" ImageUrl="~/img/delete-24.png"
                                            OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')" CommandArgument='<%#Eval("IDs")%>'
                                            Text="Xóa" CommandName="Del" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Sửa" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                                    ItemStyle-Width="50px">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="lbSua" runat="server" Width="15px" Height="15px" ImageUrl="~/img/edit.ico"
                                            CommandArgument='<%#Eval("IDs")%>' Text="Sửa" CommandName="Select" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="MaNV" ItemStyle-CssClass="padding" HeaderText="MÃ NV"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" />
                                <asp:ImageField DataImageUrlField="HinhAnh" ItemStyle-HorizontalAlign="Center" ControlStyle-Width="75px"
                                    ControlStyle-Height="80px" HeaderText="HÌNH ẢNH">
                                </asp:ImageField>
                                <asp:BoundField DataField="HoTen" ItemStyle-CssClass="padding" HeaderText="HỌ VÀ TÊN"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" />
                                <asp:BoundField DataField="MaHS" ItemStyle-CssClass="padding" HeaderText="MÃ HS"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" />
                                <asp:BoundField DataField="TenCV" HeaderText="CHỨC VỤ" ItemStyle-CssClass="padding"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="NgaySinh" ItemStyle-CssClass="padding" HeaderText="NGÀY SINH"
                                    HeaderStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Left" />
                                <asp:BoundField DataField="DienThoai" HeaderText="ĐIỆN THOẠI" ItemStyle-CssClass="padding"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                                <asp:BoundField DataField="Email" HeaderText="EMAIL" ItemStyle-CssClass="padding"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" Font-Bold="True" HorizontalAlign="Left" />
                            <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" Height="30px" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <RowStyle BackColor="White" ForeColor="#000066" Height="30px" />
                            <SelectedRowStyle BackColor="Lavender" Font-Bold="false" />
                        </asp:GridView>
                    </div>
                    <asp:HiddenField ID="hdID" runat="server" />
                </div>
            </div>
        </div>
    </div>
    <%--</ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="btncapnhat" />
        <asp:PostBackTrigger ControlID="btnSave" />
        <asp:PostBackTrigger ControlID="btnPDF" />
    </Triggers>
    </asp:UpdatePanel>--%>
</asp:Content>
